{% extends 'post_detail.html' %}



{% block title %} {{ post.title }} {% endblock title %}
{% block daima %} {{ ckeditor.load_code_theme() }}  <!-- 这个地方为了实现代码高亮！ --> {% endblock daima %}




{% block content %}

    <div class="page-header">
        <h1 align="center"><font color="black">{{ post.title }}</font>
            <span class="float-right">
      </span>
        </h1>
        {% if current_user.is_authenticated %}
            <span style="float:right"><a class="btn btn-info btn-sm"
                                         href="{{ url_for('admin.edit_post', post_id=post.id) }}">编辑</a> </span>
        {% endif %}
    </div>





    <div class="row">
        <div class="col-sm-8">
            <div class="post_body">
                {{ post.body|safe }}
            </div>
            <hr>

            <div class="modal fade postLinkModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"
                 aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title" id="exampleModalLabel">Permalink</h5>
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <div class="modal-body">
                            <div class="form-group">
                                <input type="text" class="form-control"
                                       value="{{ url_for('.show_post', post_id=post.id, _external=True) }}" readonly>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


{% endblock %}
